Qualcomm AI Engine Direct - Addition of new APIs for QNN custom op package and quantization annotation#19094
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19094
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 Cancelled Job, 2 Unrelated FailuresAs of commit fc024f1 with merge base 369f5ca ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ckage and quantization annotation
1286b0a to
fc024f1
Compare
|
Hi @cccclai, @abhinaykukkadapu, |
|
@pytorchbot label "release notes: qualcomm" |
| op_package_generator = QnnOpPackageGenerator() | ||
| op_package_generator.parse_config([xml_path]) | ||
|
|
||
| pkg_info = op_package_generator.package_infos[0] |
There was a problem hiding this comment.
Will there be only one op packaged allowed in the xml?
There was a problem hiding this comment.
Yes, there's one OpPackage per XML - each OpPackage can have multiple ops.
There was a problem hiding this comment.
@qti-mmadhava
Can we check and error out if there are more OpPackages in the XML
Also, not sure if there needs to be this limitation. Lets check the support from QAIRT
Qualcomm AI Engine Direct - Addition of new APIs for QNN custom op package and quantization annotation
QnnCustomOpPackageBuilderinbackends/qualcomm/custom_op/interface.pyto parse QNN XML op package configs viaQnnOpPackageGenerator, register per-target/platform implementations, and validate torch-to-QNN op type name mappingsIOQuantConfigdataclass andCustomOpsQuantAnnotatorclass inbackends/qualcomm/custom_op/annotator.pyto build per-op quantization annotation functions for custom ops, with support for both single and multi-output opsexamples/qualcomm/custom_op/custom_ops_1.pyas an end-to-end example using the new builder and annotator APIsexamples/qualcomm/custom_op/custom_ops_2.pyandexample_op_package_htp_multi_output/SplitCustomOpPackagedemonstrating multi-output custom op support with a split op